<template>
  <div @click="resizeClick" :class="theme + ' window-container pop-window'" v-if="show">
    <!-- <div class="window-body">
      <div class="window-header">
        <span class="window-title">
          <slot name="header"></slot>
        </span>
        <span class="window-close" title="关闭" @click="closeClick">×</span>
      </div>
      <div class="window-body">
        <slot name="content"></slot>
      </div>
      <div class="window-footer">
        <div class="window-footer-content" :class="theme">
          <slot name="footer"></slot>
        </div>
      </div>
    </div> -->
  </div>
</template>

<script setup>
import { ref, defineProps } from "vue";

const props = defineProps({
  // dark || light
  theme: { type: String, default: "dark" },
  // object类型方便后期数据拓展
  options: { type: Object },
});

const show = ref(true);

const closeClick = () => {
  // 触发关闭事件
  const closeEvent = new Event("close");
  $el.dispatchEvent(closeEvent);
};

const resizeClick = () => {
  // 触发点击事件
  const clickEvent = new Event("click");
  $el.dispatchEvent(clickEvent);
};
</script>

<style lang="less" scoped>
/* 原样式保持不变 */
</style>